unit SoundSystemI;

interface
uses VectorGeometry;
const
SoundSystemGUID:TGUID='{F627AE33-4804-4644-ADD4-34F1C05E0011}';
SoundGeometryGUID:TGUID='{A2221129-C739-49E4-9ABE-029388089B85}';
ReverbGUID:TGUID='{C62A8B2F-C28E-49FD-8F24-37495459559C}';

type SoundHandle=integer;
SS_Geometry=pointer;
ss_reverb = pointer;
SoundState=(SS_None, SS_Playing, SS_Paused);
type ISoundSystem=^_SoundSystem;
_SoundSystem=packed record
PlaySound3D:Function(const name:PChar;  pos:TVector3f; Paused:boolean):SoundHandle; cdecl;
PlaySound3DOnce:Function(const handle:SoundHandle; name:PChar; pos:TVector3f):SoundHandle; cdecl;
PlaySound2D:Function(const name:PChar;  Paused:boolean):SoundHandle; cdecl;
PlaySound2DOnce:Function(const handle:SoundHandle; name:PChar):SoundHandle; cdecl;
GetSoundPos:Function(handle:SoundHandle):TVector3f; cdecl;
SetSoundPos:procedure(handle:SoundHandle; pos:TVector3F; HeadRelative:boolean); cdecl;
MoveSound:Procedure(const Handle:SoundHandle; v:TVector3F); cdecl;
SetSoundVelocity:Procedure(const Handle:SoundHandle; velocity:TVector3F); cdecl;
SetSoundMinMaxDistance:Procedure(Handle:SoundHandle; min,max:single); cdecl;
PauseSound:Procedure(Handle:SoundHandle; state:boolean); cdecl;
StopSound:Procedure(Handle:SoundHandle); cdecl;
GetSoundState:function(Handle:SoundHandle):SoundState;
GetSoundFrequency:Function(handle:SoundHandle):Single; cdecl;
SetSoundFrequency:Procedure(handle:SoundHandle; percent:single); cdecl;
IsPlaying:Function(Handle:SoundHandle):boolean; cdecl;
                 SetListenerPos:Procedure(const pos:TVector3F); cdecl;
SetListenerOrientation:Procedure(const forward,top:TVector3F); cdecl;
MoveListener:procedure(const v:TVector3F); cdecl;
SetListenerVelocity:Procedure(const velocity:TVector3F); cdecl;
PauseAll:Procedure(const state:boolean); cdecl;
GetListenerPos:Function:TVector3F; cdecl;
end;
type ISoundGeometry=^_SoundGeometry;
_SoundGeometry = packed record
CreateGeometryBox:Function(const Pos,size:TVector3F; DirectOcclusion, ReverbOcclusion:single):SS_Geometry; cdecl;
ToggleGeometry:Procedure(const Geometry:SS_Geometry; state:boolean); cdecl;
SetGeometryPos:Procedure(const Geometry:ss_Geometry; pos:TVector3F); cdecl;
SetGeometryRotation:procedure(const Geometry:SS_Geometry; forward,top:TVector3F); cdecl;
SetGeometryWorldSize:procedure(const size:single); cdecl;
ReleaseGeometry:Procedure(const geometry:SS_Geometry); cdecl;
                         end;
                         type IReverb=^_Reverb;
                         _reverb= packed record
                         SetAmbientReverb:procedure(const reverb:PChar); cdecl;
CreateReverb:Function(const reverb:PChar; pos:TVector3F; min,max:single):ss_reverb; cdecl;
ReleaseReverb:Procedure(const reverb:SS_Reverb); cdecl;
end;
                         implementation

end.
